package com.gsit.ocrbatch.services;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import com.gsit.ocrbatch.domain.Record;

@Repository
public class RecordService {

	@PersistenceContext
	private EntityManager entityManager;
	
	
	@Transactional
	public void save(Record record) throws Exception {
		
		entityManager.persist(record);
		entityManager.flush();
		entityManager.clear();
		
	}
	

}
